﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PBO.Data.Effect.MoveEffect
{
    /// <summary>
    /// http://wiki.52poke.com/wiki/自然恩惠
    /// </summary>
    public class NaturalGift
    {

        public static byte GetNaturalGiftPower(int berryId)
        {
            if ((1 <= berryId && berryId <= 16) || (36 <= berryId && berryId <= 52))
            {
                return 60;
            }
            else if (17 <= berryId && berryId <= 32)
            {
                return 70;
            }
            return 80;
        }

        public static BattleType GetNaturalGiftType(int berryId)
        {
            int[] types = { 10, 11, 13, 12, 15, 2, 4, 5, 3, 14, 7, 6, 8, 16, 17, 9, 1 };

            if (1 <= berryId && berryId <= 16)
            {
                return (BattleType)types[berryId - 1];
            }
            else if (17 <= berryId && berryId <= 32)
            {
                return (BattleType)types[berryId - 17];
            }
            else if (33 <= berryId && berryId <= 35)
            {
                return (BattleType)types[berryId - 33];
            }
            else if (36 <= berryId && berryId <= 52)
            {
                return (BattleType)types[berryId - 36];
            }
            else if (53 <= berryId && berryId <= 60)
            {
                return (BattleType)types[berryId - 50];
            }
            else
            {
                return BattleType.Normal;
            }
        }

    }
}
